Skip to content

Change close_account to utilize the deletion pipeline #6595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

smithellis
Copy link
Contributor

I just changed close_account to use the delete_user_pipeline and modified the tests to just make sure the user is gone.

@@ -152,7 +151,7 @@ def profile(request, username):
@login_required
@require_POST
def close_account(request):
anonymize_user(request.user)
delete_user_pipeline(request.user)

# Log the user out
auth.logout(request)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you are automatically redirect and logged out on user deletion which means that the auth.logout is redundant but it's worth confirming it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell the logout and the redirect are not automatic, and have to be purposefully called.

Copy link
Collaborator

@akatsoulas akatsoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc

@smithellis smithellis merged commit 25dbc38 into mozilla:main Mar 28, 2025
2 checks passed
@smithellis smithellis deleted the 2263-change-deactivation-to-deletion-in-profiles branch March 28, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants